home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctjja86.arc
/
VDISK.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1985-09-17
|
946b
|
31 lines
Program VDISK;
var
ConfigSys, ConfigOld: text;
i, nparms: integer;
line: string[128];
begin
assign(ConfigSys, 'c:\config.sys');
nparms := ParamCount;
if nparms = 0 then {any command line parms?}
begin {no: copy file w/o vdisk to config.sys}
assign(ConfigOld, 'c:\config.nvd');
rewrite(ConfigSys);
reset(ConfigOld);
while not EOF(ConfigOld) do
begin
Readln(ConfigOld, line);
Writeln(ConfigSys, line);
end;
end
else begin {append 'device=vdisk...' to config.sys}
append(ConfigSys);
write(ConfigSys,'device=vdisk.sys');
for i := 1 to nparms do
write(ConfigSys, ' '+ParamStr(i));
writeln(ConfigSys);
end;
close(ConfigSys);
MemW[$40:$72] := $1234; {set warm boot flag in BIOS data seg}
inline($EA/0/0/$FFFF); {JMP FFFF:0000 to reset system}
end.